import request from '@/utils/request'

/**
 * 删除
 * @param pram
 */
 export function deleteObj(id) {
  return request({
    url: `/saler/purchase/storehouse/delete/${id}`,
    method: 'GET'
  })
}

/**
 * 开启
 * @param pram
 */
 export function open(id) {
  return request({
    url: `/saler/purchase/storehouse/open/${id}`,
    method: 'GET'
  })
}

/**
 * 关闭
 * @param pram
 */
 export function shutDown(id) {
  return request({
    url: `/saler/purchase/storehouse/shutDown/${id}`,
    method: 'GET'
  })
}

/**
 * 新增
 * @param pram
 */
 export function save(data) {
    return request({
      url: '/saler/purchase/storehouse/save',
      method: 'POST',
      data
    })
  }

/**
 * 修改
 * @param pram
 */
 export function edit(data) {
  return request({
    url: '/saler/purchase/storehouse/edit',
    method: 'POST',
    data
  })
}

  /**
 * 列表
 * @param pram
 */
 export function list(params) {
  return request({
    url: '/saler/purchase/storehouse/list',
    method: 'GET',
    params
  })
}